home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 May: Tool Chest / Developer CD Series Tool Chest (Apple Computer)(May 1999).iso / Tool Chest / Hardware / OpenFWBridgeFixJul97 / Buildscript < prev    next >
Encoding:
Text File  |  1997-12-04  |  2.5 KB  |  74 lines  |  [TEXT/MPS ]

  1. #
  2. #    File:        Buildscript
  3. #
  4. #    Contains:    Script of MPW commands to build this Extension
  5. #
  6. #    Version:    1
  7. #
  8. #    Copyright:    © 1997 by Apple Computer, Inc., all rights reserved.
  9. #
  10. #    File Ownership:
  11. #
  12. #        DRI:                None
  13. #
  14. #        Other Contact:        Ben Koning
  15. #
  16. #        Technology:            MacOS System 7
  17. #
  18. #    Writers:
  19. #
  20. #        (BAK)    Ben Koning
  21. #
  22. #    Change History (most recent first):
  23. #
  24. #         <2>     7/10/97    BAK        Added a unique file creator given by Dave Lyons Allocation
  25. #                                    Project, 'ofbf'.
  26. #         <1>      7/1/97    BAK        First checkin.
  27. #
  28.  
  29. #
  30. # Buildscript - Set the MPW directory to the directory containing these
  31. #                files and then execute this to script to build the Extension.
  32. #
  33.  
  34. # Setup directory shell variables:
  35. Set SrcDir            `Directory`
  36. Set ObjDir            "{SrcDir}"
  37.  
  38. # Setup name shell variables:
  39. Set Name            "OpenFWBridgeFixJuly97"
  40.  
  41. # Echo some information:
  42. Echo                "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #"
  43. Echo                "#"
  44. Echo                "# Building an Extension that is used to fix an OpenFirmware bug around 7/10/97."
  45. Echo                "#"
  46. Echo                "# Please take a moment to read these instructions:"
  47. Echo                "#"
  48. Echo                "#    1. This script and these source files are designed to work with MPW 3.4.2"
  49. Echo                "#    2. Before running this script, set MPW directory to where this script is."
  50. Echo                "#    3. Run this script, ie, by typing its name on the Worksheet."
  51. Echo                "#    4. This script produces an output file (Extension) called: {Name}."
  52. Echo                "#    5. This directory contains an output file (Text) called: ReadMe."
  53. Echo                "#"
  54. Echo                "# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #"
  55.  
  56. # Compile executable code and turn it into a resource to be "linked" in with other resources:
  57. Asm "{SrcDir}Extension.a" -i "{SrcDir}" -o "{ObjDir}Extension.a.o"
  58. Link "{ObjDir}Extension.a.o" -rt INIT=0 -o "{ObjDir}INIT=0.rsrc"
  59.  
  60. # Compile resource code, which also "includes" ("links") in the executable code compiled
  61. # above as well as other pre-compiled (".rsrc") resources into the finished file; give the
  62. # output file its final name at this stage; and delete any old output file first:
  63. Delete -i "{SrcDir}{Name}"
  64. Rez -a "{SrcDir}Extension.r" -i "{SrcDir}" -o "{SrcDir}{Name}"
  65.  
  66. # Set the filetypes to indicate that this is an Extension; set the "custom icon bit" in
  67. # the file's flag bits so the Finder displays its icon.  Note that the creator is unique
  68. # and assigned to this task, and has thus been allocated in the Apple Allocation Project:
  69. SetFile -t 'INIT' -c 'ofbf' -a C "{SrcDir}{Name}"
  70.  
  71. # Clean up trash:
  72. Delete -i "{ObjDir}Extension.a.o"
  73. Delete -i "{ObjDir}INIT=0.rsrc"
  74.